﻿$.extend(validatePrompt, {
	email : {
		onFocus : "请输入邮箱",
		succeed : "",
		isNull : "请输入邮箱",
		error : "不存在此用户名"
	}
});
$.extend(validateFunction, {
	email : function(option) {
		validateSettings.succeed.run(option);
	},
	password : function(option) {
		validateSettings.succeed.run(option);
	},

	FORM_validate : function() {
		$("#email").jdValidate(validatePrompt.email,
				validateFunction.email, true);
		$("#password").jdValidate(validatePrompt.password,
				validateFunction.password, true);
		return validateFunction.FORM_submit([ "#email", "#password" ]);
	}
});

$("#email").jdValidate(validatePrompt.email, validateFunction.email);
$("#password").jdValidate(validatePrompt.empty, validateFunction.password);

function verc() {
	$("#JD_Verification1").click();
}
$("#email,#password").bind('keyup', function(event) {
	if (event.keyCode == 13) {
		$("#loginsubmit").click();
	}
});
$("#loginsubmit").click(function() {

	var flag = validateFunction.FORM_validate();
	if (flag) {
		$("#login").submit();
	}
});

$("#email,#password, #authcode").bind('keyup', function(event) {
	if (event.keyCode == 13) {
		$("#loginsubmitframe").click();
	}
});
